From 0925e2e8e43b9ee81a5f056cfe0d1ab1517a39d8 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Tue, 12 Nov 2013 13:57:13 +0100 Subject: [PATCH] Fix WikitextContentHandlerTest::testMakeRedirectContent() when content language is not english Clear the MagicWord object cache, otherwise the magic word names can be cached in the wrong language, thus making the test fail. Change-Id: Ia6da94ca2c4f9ca892c81b4aa7cf96108b42ccd5 --- tests/phpunit/includes/content/WikitextContentHandlerTest.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/phpunit/includes/content/WikitextContentHandlerTest.php b/tests/phpunit/includes/content/WikitextContentHandlerTest.php index 75a727840b..7c62dcad24 100644 --- a/tests/phpunit/includes/content/WikitextContentHandlerTest.php +++ b/tests/phpunit/includes/content/WikitextContentHandlerTest.php @@ -79,6 +79,8 @@ class WikitextContentHandlerTest extends MediaWikiLangTestCase { global $wgContLang; $wgContLang->resetNamespaces(); + MagicWord::clearCache(); + if ( is_string( $title ) ) { $title = Title::newFromText( $title ); } -- 2.20.1